1. Field of the Invention
This invention relates to a modification risk degree measurement system, a modification risk degree measurement method and a modification risk degree measurement program, which calculate, as a risk degree, the incidence rate of a possible modification result being caused as a side effect of a modification of in a program when this program is modified
2. Description of the Related Art
In a development process of software, the task of modifying a program is inevitable work. Moreover, as one of techniques for modifying the program, a technique called re-factoring is present. Re-factoring technique is a technique for improving the maintainability and extensibility of the existing program, and aims to modify module configuration, class configuration and the like without modifying a performing function of the existing program and to impart greater stability to the program.
What is always a problem in the work of modifying a program as described above is a point that, as a result of the modification in many cases, not only a modification result intended by a programmer (object modification result) is derived, but also a subordinate result not intended by the programmer (side effect result) is generated.
Various techniques have been developed in order to investigate how the side effect result generated in the work of modifying the existing program can be estimated and avoided and determine in which region of the existing program the side effect result will be generated in a case where the side effect result cannot be avoided. For example, in order to investigate the influence relationships of the respective elements in a program on this problem, a technique called xe2x80x9cslicingxe2x80x9d has been frequently used (See Japanese Patent Laid-Open (Kokai) No.1994-202905, No.1994-175884 and No.1995-134664). xe2x80x9cSlicingxe2x80x9d refers to a technique for extracting a part calculating functions to be modified and unmodified functions from the existing program by use of dependency relationships and control dependency relationships in the program during modification. Meanwhile, with a view to measuring the relationships between the respective elements of the program, a technique of measuring a cohesion degree has been proposed (See Japanese Patent Laid-Open No. Hei 11 (1999)-224210). The cohesion degree indicates the extent to which function constitutional units of the program, that is, functions, methods and the like, are functionally independent, and indicates the properties of a single constitutional element unit. Quantitative evaluation of this index is broadly divided into seven stages, and the highest stage is called a xe2x80x9cfunctional cohesion degree,xe2x80x9d which indicates a program function constitutional unit capable of being provided by a single function. As a weaker cohesion degree, for example, there is a xe2x80x9cchronological cohesion degree,xe2x80x9d which indicates a function or the like aggregated by initialization processing. The weakest stage is called a xe2x80x9ccryptic cohesion degree,xe2x80x9d which indicates a program function constitutional unit where two or more unrelated functions are aggregated into one function. If the cohesion degree is used as described above, then the functions of the function and the method are measured, and quality of the program can be shown as an objective numerical value.
However, with regard to the slicing technique, though modification can be performed so as not to influence unmodified function, there have been incidences of the case where a portion to be modified is influenced by an unmodified portion therefore proper modification cannot be performed. Moreover, the obtained results have only investigated the existence of an influence relationship among the respective elements. And because it has not been possible to measure the influence degree, it has not been possible for the result of slicing to be a judgment criterion for determining a policy regarding modifying the existing program.
With regard to the technique for measuring a cohesion degree, in the work of modifying the existing program, whether or not the cohesion degree procedures is tight is not directly related to modifies in the program. If the cohesion degree of the procedures is high, whether or not the measurement technique is suitable for the modifying work has not been able to be explained accurately.
Moreover, the sole solution is not present in the re-factoring plan, and there may be multiple re-factoring plans, from which a similar effect can be obtained. However, judgments for ranking re-factoring plans present in plural as optimal, suitable, and unsuitable and the like are not easy. As a result, though effectiveness of the re-factoring of the program has been recognized by general users, it has been rare that the re-factoring had been actually applied.
As described above, according to the related art, when the existing program is modified, though it is possible to estimate the side effect results of the program such as the generation of new bugs, caused by the modification, it has been difficult to measure this side effect result as an objective influence degree and to obtain information to serve as an index for flexibly planning the program alterations by use of the measurement values.
The present invention was made in consideration of the above-described problems. An object of the present invention is to provide a modification risk degree measurement system, a modification risk degree measurement method and a modification risk degree measurement program, which are capable of measuring influence degrees and influence ranges for the respective plural modification plans, calculating risk degrees from the information of this measurement, and using the risk degrees as indices when the optimal modification plan is selected from among the modification plans present in plural and to provide a modification risk measurement program.
In order to attain the above-described object, a first aspect of the present invention inheres in a modification risk degree measurement system, including: (A) an extracting module configured to extract a program constituent element from an program as an influenced element, the program constituent element being influenced by program modification data; (B) an influenced element storage unit configured to store the influenced element; (C) an influence range specifying module configured to specify an influence range from the influenced element; (D) an influence range storage unit configured to store the influence range; (E) an influence degree determining module configured to determine a degree of influence on the program by the influenced element; (F) an influence degree storage unit configured to store the degree of influence; and (G) a risk degree calculating unit configured to calculate a modification risk degree of the program by using the influence range and the degree of influence.
According to the modification risk degree measurement system in accordance to the first feature of the present invention, a system for calculating the modification risk degree in consideration of both of the influence degree and the influence range is adopted, and thus it is possible to make risk degree estimation excellent in comparison with a system of considering only one thereof.
A second aspect of the present invention inheres in a program reconstruction support system for assistance to form a plan for program modification, comprising:(A) an extracting module configured to extract a program constituent element from an program as an influenced element, the program constituent element being influenced by program modification data; (B) an influenced element storage unit configured to store the influenced element; (C) an influence range specifying module configured to specify an influence range from the influenced element; (D) an influence range storage unit configured to store the influence range; (E) an influence degree determining module configured to determine a degree of influence on the program by the influenced element; (F) an influence degree storage unit configured to store the degree of influence; (G) a risk degree calculating module configured to calculate a modification risk degree of the program by using the influence range and the degree of influence; and (H) a re-factoring module configured to assist to re-factor a plan for program modification by using information which includes risk degree.
A third aspect of the present invention inheres in a modification risk degree measurement method, including the steps of (A) extracting a program constituent element from a program as influenced element, the program constituent element being influenced by program modification data; (B) storing the influenced element; (C) specifying an influence range from the influenced element; (D) storing the influence range; (E) determining a degree of influence on the program by the influenced element; (F) storing the degree of influence; and (G) calculating a modification risk degree of the program caused by the program modification data, by using the influence range and the influence degree.
A fourth aspect of the present invention inheres in a method for supporting computer program reconstruction, including the steps of: (A) extracting a program constituent element from a program as an influenced element, the program constituent element being influenced by program modification data; (B) storing the influenced element; (C) specifying an influence range from the influenced element; (D) storing the influence range; (E) determining a degree of influence on the program by the influenced element; (F) storing the degree of influence; (G) calculating a modification risk degree of the program caused by the program modification data, by using the influence range and the influence degree; and (H) assisting for re-factoring a plan for program modification by using information which includes risk degree.
A fifth aspect of the present invention inheres a computer readable medium which stored a program for driving and controlling a modification risk degree measurement system for measuring a risk degree by a program modification, the program including: (A) a command for extracting a program constituent element from a program as influenced element, the program constituent element being influenced by program modification data; (B) a command for storing the influenced element; (C) a command for specifying an influence range from the influenced element; (D) a command for storing the influence range; (E) a command for determining a degree of influence on the program by the influenced element; (F) a command for storing the degree of influence; and (G) a command for calculating a modification risk degree of the program caused by the program modification data by using the influence range and the influence degree.
A sixth aspect of the present invention inheres a computer readable medium which stored a program for supporting computer program reconstruction, comprising; (A) instructions for extracting a program constituent element from a program as influenced element, the program constituent element being influenced by program modification data; (B) instructions for storing the influenced element; (C) instructions for specifying an influence range from the influenced element; (D) instructions for storing the influence range; (E) instructions for determining a degree of influence on the program by the influenced element; (F) instructions for storing the degree of influence; (G)instructions for calculating a modification risk degree of the program caused by the program modification data by using the influence range and the influence degree; and (H) instructions for assisting to re-factor a plan for program modification by using information which includes risk degree.